<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/26 0026
 * Time: 下午 12:45
 */

namespace app\index\controller;
use app\index\controller\Base;
use think\Db;

class Cate extends Base
{
    public function lst()
    {
        $cateid = input('cateid');
        $articles = Db::name('article')->where(array('cate_id'=>$cateid))->paginate(10);
        $count = $articles->lastPage();
        $this->assign('count', $count);
        $this->assign('articles',$articles);
        return view('list');
    }
}